import service from '@/utils/request'

export function getDepartment() {
  return service({
    url: '/company/department'
  })
}

export function getManagerList() {
  return service({
    url: 'sys/user/simple'
  })
}

export function addDepartment(data) {
  return service({
    url: '/company/department',
    method: 'post',
    data
  })
}

export function getDepartmentDetail(id) {
  return service({
    url: `/company/department/${id}`
  })
}

export function updateDepartment(data) {
  return service({
    url: `/company/department/${data.id}`,
    method: 'put',
    data
  })
}

export function delDepartment(id) {
  return service({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}

